<?php

namespace Gds\AchatBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Gds\AchatBundle\Entity\FactureAvoirFournisseur
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Gds\AchatBundle\Entity\FactureAvoirFournisseurRepository")
 */
class FactureAvoirFournisseur {

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="Gds\AchatBundle\Entity\LigneFactureAvoirFournisseur", mappedBy="facture_avoir")

     */
    private $lignes_facture_avoir;

    

    /**
     * @var \DateTime $date
     *
     * @ORM\Column(name="date", type="date")
     */
    private $date;

    /**
     * @var string $reference
     *
     * @ORM\Column(name="reference", type="string", length=255)
     */
    private $reference;

    /**
     * @var float $montant_ttc
     *
     * @ORM\Column(name="montant_ttc", type="decimal", scale=3)
     */
    private $montant_ttc;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return FactureAvoirFournisseur
     */
    public function setDate($date) {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate() {
        return $this->date;
    }

    /**
     * Set reference
     *
     * @param string $reference
     * @return FactureAvoirFournisseur
     */
    public function setReference($reference) {
        $this->reference = $reference;

        return $this;
    }

    /**
     * Get reference
     *
     * @return string 
     */
    public function getReference() {
        return $this->reference;
    }

    /**
     * Set montant_ttc
     *
     * @param float $montantTtc
     * @return FactureAvoirFournisseur
     */
    public function setMontantTtc($montantTtc) {
        $this->montant_ttc = $montantTtc;

        return $this;
    }

    /**
     * Get montant_ttc
     *
     * @return float 
     */
    public function getMontantTtc() {
        return $this->montant_ttc;
    }

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->lignes_facture_avoir = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add lignes_facture_avoir
     *
     * @param \Gds\AchatBundle\Entity\LigneFactureAvoirFournisseur $lignesFactureAvoir
     * @return FactureAvoirFournisseur
     */
    public function addLignesFactureAvoir(\Gds\AchatBundle\Entity\LigneFactureAvoirFournisseur $lignesFactureAvoir)
    {
        $this->lignes_facture_avoir[] = $lignesFactureAvoir;

        return $this;
    }

    /**
     * Remove lignes_facture_avoir
     *
     * @param \Gds\AchatBundle\Entity\LigneFactureAvoirFournisseur $lignesFactureAvoir
     */
    public function removeLignesFactureAvoir(\Gds\AchatBundle\Entity\LigneFactureAvoirFournisseur $lignesFactureAvoir)
    {
        $this->lignes_facture_avoir->removeElement($lignesFactureAvoir);
    }

    /**
     * Get lignes_facture_avoir
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLignesFactureAvoir()
    {
        return $this->lignes_facture_avoir;
    }
}
